/**
 * 
 */
if (Ext.form.VTypes) {
	Ext.apply(Ext.form.VTypes, {
				"checkCode" : function(_str) {
					var flag = false;
					if (_str != "") {
						Ext.Ajax.request({
									url : 'vaildCheckCode.action',
									params : {
										'checkCode' : _str
									},
									method : 'POST',
									async : false,
									success : function(response, options) {
										var result = Ext.util.JSON
												.decode(response.responseText
														.trim());
										flag = result['success'];
									}
								});
					} else {
						flag = false;
					}
					return flag;
				},
				"checkCodeText" : "验证码错误",
				"checkCodeMask" : ''
			});
}
if (Ext.form.VTypes) {
	Ext.apply(Ext.form.VTypes, {
				"checkParameName" : function(_str) {
					var flag = false;
					if (_str != "") {
						Ext.Ajax.request({
									url : 'checkParameName.action',
									params : {
										'param.parameterName' : _str
									},
									method : 'POST',
									async : false,
									success : function(response, options) {
										var result = Ext
												.decode(response.responseText
														.trim());
										flag = result['success'];
									}
								});
					}
					return flag;
				},
				"checkParameNameText" : "参数名重复",
				"checkParameNameMask" : ''
			});
}
if(Ext.form.VTypes){
	Ext.apply(Ext.form.VTypes,{
		"checkImage":function(_str,_obj){
		//	Ext.Msg.alert(_obj.id);
			var file = document.getElementById(_obj.id+"-file");
			Ext.Msg.alert(file.fildSize);
			return false;
		},
		"checkImageText":"图片太大",
		"checkImageMask":""
	});
}
